<ion-view view-title="订单详情">
    <ion-content>
        <ion-refresher on-refresh="doRefresh()"></ion-refresher>
        <div class="card">
            <div class="item item-text-wrap item-icon-left">
                <h2>{{order.state}}</h2>
                <p>{{order.statedescribe}}</p>
                <i class="icon ion-android-clipboard"></i>
            </div>
        </div>

        <div class="card">
            <div class="item item-divider-android item-icon-left">
                <h2>{{ordername}}</h2>
                <i class="icon ion-social-dropbox-outline"></i>
            </div>
            <div class="item item-text-wrap">
                <ul class="list">
                    <li class="item" ng-repeat="food in order.foods" style="padding: 3px">
                        <i class="item-note">×{{food.count}}&nbsp;&nbsp;&nbsp;&nbsp;￥{{food.count * food.price}}</i>
                        <p>{{food.foodname}}</p>
                    </li>
                </ul>
            </div>
            <div class="item item-divider-android">
                <i class="item-note assertive">合计 ￥{{order.totalprice}}</i>
            </div>
        </div>

        <div class="card">
            <div class="item item-divider-android">
                <h3>配送信息</h3>
            </div>
            <div class="item item-text-wrap">
                <p>配送方式：{{order.deliverymethod}}</p>
            </div>
        </div>

        <div class="card">
            <div class="item item-divider-android">
                <i class="item-note" style="font-size: smaller">订单号：{{order.orderid}}</i>
                <h3>订单详情</h3>
            </div>
            <div class="item item-text-wrap" style="padding: 0">
                <ul class="list">
                    <li class="item" style="font-size: small">联系人：{{order.contacts}}</li>
                    <li class="item" style="font-size: small">联系电话：{{order.tel}}</li>
                    <li class="item" style="font-size: small">收获地址：{{order.address}}</li>
                    <li class="item" style="font-size: small">支付方式：{{order.paymethod}}</li>
                    <li class="item" style="font-size: small">下单时间：{{order.ordertime}}</li>
                    <li class="item" style="font-size: small">备注：{{order.note}}</li>
                </ul>
            </div>
        </div>
    </ion-content>
    <ion-footer-bar class="bar-positive">
        <div class="bar bar-footer bar-light">
            <a ng-show="{{order.statecode == 3}}" class="icon ion-ios-compose-outline"
               style="font-size: xx-large;margin-left: 10px;color: #000;"></a>

            <button ng-show="{{order.statecode != 3 && order.statecode != 1}}"
                    class="button button-small button-assertive pull-right"
                    style="margin-right: 90px" ng-click="return({{order.orderid}})">退订
            </button>
            <button ng-show="{{order.statecode != 3}}" class="button button-large button-balanced pull-right"
                    style="margin-right: 10px" ng-click="confirm(shop)">确认收货
            </button>
            <button ng-show="{{order.statecode == 3}}" class="button button-large button-balanced pull-right"
                    style="margin-right: 10px" ng-click="buyAgain(shop)">再来一单
            </button>
        </div>
    </ion-footer-bar>
</ion-view>
